from django.db import models


class TYPE(models.Model):
    rolename = models.CharField(max_length=20,null=False)


class Users(models.Model):
    SEX=((1,'男'),(2,'女'))
    uname = models.CharField(max_length=20,null=False)
    truename = models.CharField(max_length=20,null=False)
    pwd = models.CharField(max_length=32,null=False)
    tel = models.CharField(max_length=11,null=False)
    sex = models.IntegerField(max_length=1,choices=SEX)
    roleid = models.IntegerField(max_length=5,default='12138')
    address = models.CharField(max_length=100,null=False)
    eid = models.ForeignKey(TYPE, on_delete=models.CASCADE)













